<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="com.liu.pojo.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<c:out value="this is jstl1"></c:out>
	<br>
	<c:out escapeXml="false" value="<br>this is jstl2<br>"></c:out>
	<c:out value="<br>this is jstl2<br>"></c:out>
	<br>
	<c:out default="输入为空" value="${name}"></c:out>
	<br>
	<c:out default="输入为空" value="张三"></c:out>
	<br>
	<c:set var="id" scope="session" value="100"></c:set>
	<c:out value="${id}"></c:out>
	<br>
	<%-- <jsp:useBean id="user" class=com.liu.pojo.User></jsp:useBean> --%>
	<%-- <c:set property="name" value="zhansan" target="${user}"></c:set>
	<c:out value="${user.name }"></c:out> --%>
	
	<c:set var="score" value="70"></c:set>
	<c:choose >
		<c:when test="${score>=90 }">
			很牛！
		</c:when>
		<c:when test="${score>=80 }">
			有点本事！
		</c:when>
		<c:when test="${score>=60 }">
			一般般！
		</c:when>
		<c:otherwise>
			太差劲！
		</c:otherwise>
	</c:choose>
	<jsp:useBean id="user" class="com.liu.pojo.User"></jsp:useBean>
	 <c:set property="name" target="${user }" value="张三"></c:set>                                                   
	<c:out value="${user.name }"></c:out>
	<br>
	<hr>
	<c:set var="id1" value="1002"></c:set>
	<c:if var="id2" test="${id1==1001 }">
	id1==id2
	</c:if>
	<c:out value="${id2 }"></c:out>
	<br>
	<c:catch var="exception"> 
		<%
		try{
			int i=1/0;
		}catch(Exception e){
			out.print("这样的错也能犯？");
		}
		%>	
		</c:catch>
	<c:out value="${exception}"></c:out>
	<br>
	<%
	List<Integer> list=new ArrayList<Integer>();
	list.add(1);
	list.add(2);
	list.add(3);
	list.add(4);
	list.add(5);
	list.add(6);
	request.setAttribute("list", list);
	%>
	<c:forEach var="num" items="${list}" begin="1" end="4" varStatus="status">
		当前值:<c:out value="${num}"></c:out><br>
		当前值所在索引下标:<c:out value="${status.index }"></c:out><br>
		当前循环次:<c:out value="${status.count }"></c:out><br>
		当前值是否为第一个循环值:<c:out value="${status.first }"></c:out><br>
		当前值是否为最后一个循环值:<c:out value="${status.last }"></c:out><br><hr>
	</c:forEach>
	<c:forTokens var="i" items="1,2,34,5,6" delims=",">
	<c:out value="${i }"></c:out>
	</c:forTokens>
	<br>
	<c:import url="http://localhost:9090/EL/el.jsp" charEncoding="utf-8"></c:import>
	<hr>
	<c:url value="http://localhost:9090/TaoBao/login.jsp" var="i">
	<c:param name="name" value="张三"></c:param>
	<c:param name="id" value="1234"></c:param>
	</c:url>
	<a href="${i }"></a>
	
	
</body>
</html>